var VideoRigolo = new Object();
VideoRigolo.rev          = 5;
VideoRigolo.SearchDesc   = 'Search on VideoRigolo';
VideoRigolo.Name         = "VideoRigolo";
VideoRigolo.Search       = function (keyword, page){
  var result = new Object();
  result.bypage            = 12;
  result.start             = (page-1)*result.bypage+1;
  c = GetContents('http://www.videorigolo.com/s-'+escape(keyword)+'-'+page+'-0-1.html');
  switch (keyword) {
    case '#best':
    c = GetContents('http://www.videorigolo.com/s-tous-'+page+'-1-2.html');
    break;
    case '#news':
    c = GetContents('http://www.videorigolo.com/s-tous-'+page+'-1-1.html');
    break;
    case '#views':
    c = GetContents('http://www.videorigolo.com/s-tous-'+page+'-1-3.html');
    break;
  }
  result.total             = -1;
  result.VideoInfo = new Array();
  if (page == 1){
    video = new Object();
    video.attr          = 1;
    video.Title         = 'GoTube info';
    video.Description   = "You can search #best, #news or #views for find the best, the news \n or the most viewed videos on this site.";
    video.Tags          = '#best #news #views';
    result.VideoInfo.push(video);
  }
  while (p = c.indexOf('<a href="/v',p)+1){
    video = new Object();
    video.attr          = 1;
    video.ThumbnailURL  = 'http://www.videorigolo.com'+ext('<img src="');
    video.id            = video.ThumbnailURL.match(/.*?videos\/(.*)/)[1];
    video.Title         = ext('<b>','</b>');
    video.Description   = ext('<i>','</i>');
    video.SaveFilename  = video.Title+'.flv';
    video.URL           = 'http://www.videorigolo.com/videos/'+video.id+'.flv';
    if (video.Description != null){
      result.VideoInfo.push(video);
    }
  }
  result.end          = result.start-1+result.VideoInfo.length;
  return result;
}
SiteList.push(VideoRigolo);